/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.easoftware.code.beans.jpa;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import net.easoftware.code.beans.maintenance.annotation.DataTableColumn;
import org.eclipse.persistence.annotations.NamedStoredProcedureQuery;

/**
 *
 * @author waumovil-javaengineer
 */
@Entity
@Table(name = "ordenretenidaca_store")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "OrdenretenidacaStore.findAll", query = "SELECT o FROM OrdenretenidacaStore o"),
    @NamedQuery(name = "OrdenretenidacaStore.findById", query = "SELECT o FROM OrdenretenidacaStore o WHERE o.id = :id"),
    @NamedQuery(name = "OrdenretenidacaStore.findByDocumento", query = "SELECT o FROM OrdenretenidacaStore o WHERE o.documento = :documento"),
    @NamedQuery(name = "OrdenretenidacaStore.findByRetencion", query = "SELECT o FROM OrdenretenidacaStore o WHERE o.retencion = :retencion")})
@NamedStoredProcedureQuery(  
    name = "procesarOrdenesRet",
procedureName = "procesarOrdenesRet",
returnsResultSet = false)
public class OrdenretenidacaStore implements Serializable {

    @DataTableColumn(order = 1, title = "Compania", name = "compania")
    @Column(name = "compania")
    private Integer compania;
    @DataTableColumn(order = 2, title = "Codigo", name = "codigo")
    @Size(max = 45)
    @Column(name = "codigo")
    private String codigo;
    @Size(max = 50)
    @DataTableColumn(order = 3, title = "Cliente", name = "cliente")
    @Column(name = "cliente")
    private String cliente;
    @DataTableColumn(order = 4, title = "Segmento", name = "segmento")
    @Size(max = 45)
    @Column(name = "segmento")
    private String segmento;
    @DataTableColumn(order = 5, title = "Tipo Docto.", name = "tipoDoc")
    @Size(max = 45)
    @Column(name = "tipoDoc")
    private String tipoDoc;
    @Size(max = 45)
    @Column(name = "sdsrp1")
    private String sdsrp1;
    @Column(name = "fecha1")
    @Temporal(TemporalType.DATE)
    private Date fecha1;
    @Column(name = "fecha2")
    @Temporal(TemporalType.DATE)
    private Date fecha2;
    @Size(max = 45)
    @Column(name = "usuario1")
    private String usuario1;
    @Size(max = 45)
    @Column(name = "zona")
    private String zona;
    @Size(max = 50)
    @Column(name = "repventas")
    private String repventas;
    @Column(name = "sdlttr")
    private Integer sdlttr;
    @Column(name = "sdnxtr")
    private Integer sdnxtr;
    @Size(max = 45)
    @Column(name = "hora")
    private String hora;
    @Size(max = 45)
    @Column(name = "usuario2")
    private String usuario2;
    @Size(max = 45)
    @Column(name = "tcredito")
    private String tcredito;
    @Size(max = 45)
    @Column(name = "mscredito")
    private String mscredito;
    @Column(name = "limite")
    private Integer limite;
    @Size(max = 45)
    @Column(name = "tiporet")
    private String tiporet;
    @Size(max = 50)
    @Column(name = "tiporetencion2")
    private String tiporetencion2;
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;
    @Size(max = 45)
    @Column(name = "documento")
    @DataTableColumn(order = 7, title = "Documento", name = "documento")
    private String documento;
    @Size(max = 45)
    @Column(name = "retencion")
    private String retencion;
    @Column(name = "unidadnegocio")
    private Integer unidadnegocio;
    @Column(name = "lineanegocio")
    private Integer lineanegocio;
    @JoinColumn(name = "cargadatos", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Cargadatos cargadatos;
    @Column(name = "subtipo")
    private String subtipo;

    public String getSubtipo() {
        return subtipo;
    }

    public void setSubtipo(String subtipo) {
        this.subtipo = subtipo;
    }

    public OrdenretenidacaStore() {
    }

    public OrdenretenidacaStore(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDocumento() {
        return documento;
    }

    public void setDocumento(String documento) {
        this.documento = documento;
    }

    public String getRetencion() {
        return retencion;
    }

    public void setRetencion(String retencion) {
        this.retencion = retencion;
    }

    public Cargadatos getCargadatos() {
        return cargadatos;
    }

    public void setCargadatos(Cargadatos cargadatos) {
        this.cargadatos = cargadatos;
    }

    public Integer getUnidadnegocio() {
        return unidadnegocio;
    }

    public void setUnidadnegocio(Integer unidadnegocio) {
        this.unidadnegocio = unidadnegocio;
    }

    public Integer getLineanegocio() {
        return lineanegocio;
    }

    public void setLineanegocio(Integer lineanegocio) {
        this.lineanegocio = lineanegocio;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += ( id != null ? id.hashCode() : 0 );
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!( object instanceof OrdenretenidacaStore )) {
            return false;
        }
        OrdenretenidacaStore other = (OrdenretenidacaStore) object;
        if (( this.id == null && other.id != null ) || ( this.id != null && !this.id.equals(other.id) )) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "net.easoftware.code.beans.jpa.OrdenretenidacaStore[ id=" + id + " ]";
    }

    public Integer getCompania() {
        return compania;
    }

    public void setCompania(Integer compania) {
        this.compania = compania;
    }

    public String getCodigo() {
        return codigo;
    }

    public void setCodigo(String codigo) {
        this.codigo = codigo;
    }

    public String getCliente() {
        return cliente;
    }

    public void setCliente(String cliente) {
        this.cliente = cliente;
    }

    public String getSegmento() {
        return segmento;
    }

    public void setSegmento(String segmento) {
        this.segmento = segmento;
    }

    public String getTipoDoc() {
        return tipoDoc;
    }

    public void setTipoDoc(String tipoDoc) {
        this.tipoDoc = tipoDoc;
    }

    public String getSdsrp1() {
        return sdsrp1;
    }

    public void setSdsrp1(String sdsrp1) {
        this.sdsrp1 = sdsrp1;
    }

    public Date getFecha1() {
        return fecha1;
    }

    public void setFecha1(Date fecha1) {
        this.fecha1 = fecha1;
    }

    public Date getFecha2() {
        return fecha2;
    }

    public void setFecha2(Date fecha2) {
        this.fecha2 = fecha2;
    }

    public String getUsuario1() {
        return usuario1;
    }

    public void setUsuario1(String usuario1) {
        this.usuario1 = usuario1;
    }

    public String getZona() {
        return zona;
    }

    public void setZona(String zona) {
        this.zona = zona;
    }

    public String getRepventas() {
        return repventas;
    }

    public void setRepventas(String repventas) {
        this.repventas = repventas;
    }

    public Integer getSdlttr() {
        return sdlttr;
    }

    public void setSdlttr(Integer sdlttr) {
        this.sdlttr = sdlttr;
    }

    public Integer getSdnxtr() {
        return sdnxtr;
    }

    public void setSdnxtr(Integer sdnxtr) {
        this.sdnxtr = sdnxtr;
    }

    public String getHora() {
        return hora;
    }

    public void setHora(String hora) {
        this.hora = hora;
    }

    public String getUsuario2() {
        return usuario2;
    }

    public void setUsuario2(String usuario2) {
        this.usuario2 = usuario2;
    }

    public String getTcredito() {
        return tcredito;
    }

    public void setTcredito(String tcredito) {
        this.tcredito = tcredito;
    }

    public String getMscredito() {
        return mscredito;
    }

    public void setMscredito(String mscredito) {
        this.mscredito = mscredito;
    }

    public Integer getLimite() {
        return limite;
    }

    public void setLimite(Integer limite) {
        this.limite = limite;
    }

    public String getTiporet() {
        return tiporet;
    }

    public void setTiporet(String tiporet) {
        this.tiporet = tiporet;
    }

    public String getTiporetencion2() {
        return tiporetencion2;
    }

    public void setTiporetencion2(String tiporetencion2) {
        this.tiporetencion2 = tiporetencion2;
    }
}
